//
//  UserModel.h
//  EraPig
//
//  Created by Mac_Mini on 2021/3/18.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface UserModel : NSObject

@property (nonatomic, assign) NSInteger userId;

@property (nonatomic, copy) NSString *token_type;

@property (nonatomic, copy) NSString *refresh_token;

@property (nonatomic, copy) NSString *access_token;
@end

@interface UserModel (Archive)

+ (void)archive:(nullable UserModel *)userModel;
+ (UserModel *)unarchive;

+ (BOOL)isLogin;

/// 操作前判断用户是否登录，如果没有登录就跳转到登录页面
/// @param viewController 发起请求的控制器
/// @param jumpType 跳转方式
+ (BOOL)checkLoginStateFromViewController:(UIViewController *)viewController jumpType:(JumpType)jumpType;
@end

NS_ASSUME_NONNULL_END
